#include "../NewSyndrome-module.h"

void
module_init (void)
{
  bot_set_auteur_module ("Thaeron");
  bot_set_desc_module ("auto-rejoin apres kick");
  bot_set_ident_module ("rejoin");
  bot_set_version_module ("0.2.1");
  bot_add_type_handler ("KICK", "rejoin");
}

#ifdef WIN32
void
init_dep (char *nom, void *addr)
{
  init_share_dep (nom, addr);
}
#endif

int
rejoin (msg * i)
{
  char buffer[201];
  if (i->argu > 0 && !is_botnick (i->argu[0]))
    return 0;
  snprintf (buffer, 200, "JOIN %s\n", i->dest);
  buffer[200] = 0;
  bot_send_raw (buffer);
  return 0;
}
